"use client";
import dynamic from 'next/dynamic';
import ToolEventsListener from '../components/EventListener';

// 动态导入 CopilotKit 组件，禁用 SSR
const CopilotComponent = dynamic(() => import('../components/CopilotComponent'), {
  ssr: false,
  loading: () => (
    <div className="flex items-center justify-center h-screen">
      <div className="text-lg">Loading Smart Agent...</div>
    </div>
  )
});

export default function YourApp() {
  return (
    <>
      <CopilotComponent />
      <ToolEventsListener />
    </>
  );
}
